package com.itboye.hutouben.util;

import android.app.Activity;
import android.widget.ImageView;

import com.itboye.hutouben.bean.LuntanIndexPageBean;
import com.itboye.hutouben.widget.LoweImageView;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2017/7/19.
 */

public class LunBoUtils {
    public ArrayList<ImageView> setLunBoData(Activity activity, List<LuntanIndexPageBean.BannersEntity> LunboBean, CarouselView carouselView) {
        ArrayList<ImageView> arrayBmps = new ArrayList<>();
        for (int i = 0; i < LunboBean.size(); i++) {
            LoweImageView imageView = new LoweImageView(activity);
            imageView.setScaleType(ImageView.ScaleType.FIT_XY);
            XImageLoader.load(Const.imgurl
                    + LunboBean.get(i).getImg(), imageView);
            arrayBmps.add(imageView);
            imageView.setTag(i);
        }
        carouselView.setImageBitmaps(arrayBmps);
        return arrayBmps;
    }

}
